package com.pingan.springboot_es_api.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * Created by Kay on 2018/11/5
 *  接收查询参数json串
 */
@ApiModel(value = "查询条件模型")
public class Filters implements Serializable {
    private static final long  serialVersionUID = 1L;
    //性别
    //可以传入多值，之间用逗号，分隔。例如:    "sex":"男,女,未知"
    @ApiModelProperty(value = "性别" ,
            example = "男,女")
    private String sex;
    //年龄
    //支持多范围组合,区间之间用分号分隔,区间内用逗号
    //例如 年龄在[20,30] 或 小于等于10岁，或大于等于40岁，或等于35岁 则传入如下
    // "age":"20,30;,10;40,;35"
    @ApiModelProperty(value = "年龄",notes = "支持多范围组合,区间之间用分号分隔,区间内用逗号",
       example = "20,30;,10;40,;35")
    private String age;
    //区域
    //多个地区用逗号,分隔，例如
    // "region":"北京,山东,广东"
    @ApiModelProperty(value = "地区", notes = "逗号分隔",example = "北京,山东,广东")
    private String region;
    // 疾病
    // 疾病传入格式为  code1,code2,code3...;name1,name2,name3...  示例如下
    // "disease":"J00,M47.8,J31.0;感冒,颈椎病,鼻炎"
    @ApiModelProperty(value = "疾病",notes = "格式=> 编码1,编码2,编码3;名称1,名称2,名称3"
            ,example = "J00,M47.8,J31.0;感冒,颈椎病,鼻炎")
    private String disease;
    // 药品
    // 药品传入格式为  code1,code2,code3...;name1,name2,name3...  示例如下
    //   "medical":"A10AB01,A10BA02,A10BB12;name1,name2,name3"
    // 目前版本 只查询编码，名称不做查询处理
    @ApiModelProperty(value = "药品", notes = "格式=> 编码1,编码2,编码3;名称1,名称2,名称3",example = "A01AB18,A01AB17,A01AD01;复方克霉唑乳膏,甲硝唑栓,诺氟沙星胶囊")
    private String medical;
    // 就诊时间
    // 接收格式 ： (开始时间,结束时间)  时间格式为yyyy-MM-dd HH:mm:ss , 示例如下
    // "diagnosisTime":"2011-01-01 00:00:00,2018-12-03 23:12:32"
    @ApiModelProperty(value = "就诊时间",notes = "格式=> 开始时间,结束时间 或 开始时间, 或 ,结束时间"
            ,example = "2011-01-01 00:00:00,2018-12-03 23:12:32")
    private String diagnosisTime;
    //排序
    // 用 | 分隔 ，示例
    //  "sortColumn":"party_id|age"
    @ApiModelProperty(value = "排序列", notes = "|分隔",example = "party_id|age")
    private String sortColumn;
    // 排序方式
    // 用 | 分隔 ，示例
    //  "sortOrder":"asc|desc"
    @ApiModelProperty(value = "排序order", notes = "|分隔" , example = "asc|desc")
    private String sortOrder;  // 升序降序   asc|desc
    // 分页 第几页
    @ApiModelProperty(value = "页数", required = true,example = "1")
    private Long currentPage;
    // 每页大小
    @ApiModelProperty(value = "每页条数",required = true,example = "20")
    private Long pageSize;

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String getDisease() {
        return disease;
    }

    public void setDisease(String disease) {
        this.disease = disease;
    }

    public String getMedical() {
        return medical;
    }

    public void setMedical(String medical) {
        this.medical = medical;
    }

    public String getDiagnosisTime() {
        return diagnosisTime;
    }

    public void setDiagnosisTime(String diagnosisTime) {
        this.diagnosisTime = diagnosisTime;
    }

    public String getSortColumn() {
        return sortColumn;
    }

    public void setSortColumn(String sortColumn) {
        this.sortColumn = sortColumn;
    }

    public String getSortOrder() {
        return sortOrder;
    }

    public void setSortOrder(String sortOrder) {
        this.sortOrder = sortOrder;
    }

    public Long getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(Long currentPage) {
        this.currentPage = currentPage;
    }

    public Long getPageSize() {
        return pageSize;
    }

    public void setPageSize(Long pageSize) {
        this.pageSize = pageSize;
    }

    @Override
    public String toString() {
        return "Filters{" +
                "sex='" + sex + '\'' +
                ", age='" + age + '\'' +
                ", region='" + region + '\'' +
                ", disease='" + disease + '\'' +
                ", medical='" + medical + '\'' +
                ", diagnosisTime='" + diagnosisTime + '\'' +
                ", sortColumn='" + sortColumn + '\'' +
                ", sortOrder='" + sortOrder + '\'' +
                ", currentPage=" + currentPage +
                ", pageSize=" + pageSize +
                '}';
    }
}
